package com.flyee.communicate.character{
	
	import com.flyee.communicate.Handler;
	import com.flyee.io.socket.command.down.CommandDown;
	import com.flyee.ro.commanddown.MoveAvatarsDown;
	import com.flyee.ro.rpc.AvatarRO;
	import com.flyee.utils.Obsevable;

	public class MoveAvatarsHandler extends Obsevable implements Handler{
		
		public function MoveAvatarsHandler(){
			super();
		}
		
		public function process(cmd:CommandDown):void{
			var command : MoveAvatarsDown = cmd as MoveAvatarsDown;
	        
	        for each(var avatar : AvatarRO in command.avatars){
		        setChanged();	        
		        notifyObsevers("synchronize",avatar.avatarId, avatar.startX, avatar.startY, avatar.listPane);
	        }
		}
		
	}
}